home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / wind5x.arc / WNDW5X.DOC < prev    next >
Text File  |  1991-01-09  |  94KB  |  2,421 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                            MULTI-LEVEL VIRTUAL WINDOWS
  21.                                    USER'S GUIDE
  22.  
  23.                                    Version 5.X
  24.                                 December 20, 1988
  25.  
  26.  
  27.                   Copyright (C) 1988 Eagle Performance Software
  28.                               All Rights Reserved.
  29.  
  30.  
  31.  
  32.                                _______                     
  33.                           ____|__     |               (tm) 
  34.                        --|       |    |------------------- 
  35.                          |   ____|__  |  Association of    
  36.                          |  |       |_|  Shareware         
  37.                          |__|   o   |    Professionals     
  38.                        -----|   |   |--------------------- 
  39.                             |___|___|    MEMBER            
  40.  
  41.  
  42.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  43.  
  44.  
  45.  
  46.                        T A B L E   O F   C O N T E N T S
  47.  
  48.         1. INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . 4
  49.              Features .  . . . . . . . . . . . . . . . . . . . . . 4
  50.              Using the Manuals . . . . . . . . . . . . . . . . . . 4
  51.              Licensing . . . . . . . . . . . . . . . . . . . . . . 5
  52.              Customer Service  . . . . . . . . . . . . . . . . . . 5
  53.              ASP . . . . . . . . . . . . . . . . . . . . . . . . . 6
  54.  
  55.         2. GETTING STARTED . . . . . . . . . . . . . . . . . . . . 7
  56.              Distribution Files  . . . . . . . . . . . . . . . . . 7
  57.              Demonstration . . . . . . . . . . . . . . . . . . . . 7
  58.  
  59.         3. PROGRAMMING WINDOWS . . . . . . . . . . . . . . . . . . 8
  60.              Basic Programming . . . . . . . . . . . . . . . . . . 8
  61.              Window Definitions  . . . . . . . . . . . . . . . . . 9
  62.              Basic Routines  . . . . . . . . . . . . . . . . . . . 10
  63.              MakeWindow Parameters . . . . . . . . . . . . . . . . 10
  64.              Window Modes  . . . . . . . . . . . . . . . . . . . . 11
  65.                Defaults  . . . . . . . . . . . . . . . . . . . . . 11
  66.                SetWindowModes  . . . . . . . . . . . . . . . . . . 12
  67.                List of Modes . . . . . . . . . . . . . . . . . . . 12
  68.                Shadows . . . . . . . . . . . . . . . . . . . . . . 13
  69.                ZoomMode  . . . . . . . . . . . . . . . . . . . . . 13
  70.                RelMode . . . . . . . . . . . . . . . . . . . . . . 13
  71.                PermMode  . . . . . . . . . . . . . . . . . . . . . 13
  72.                SeeThruMode . . . . . . . . . . . . . . . . . . . . 14
  73.                Hidden Mode . . . . . . . . . . . . . . . . . . . . 14
  74.                Virtual Mode  . . . . . . . . . . . . . . . . . . . 15
  75.              Cursor Modes  . . . . . . . . . . . . . . . . . . . . 16
  76.  
  77.         3. WRITING TO WINDOWS  . . . . . . . . . . . . . . . . . . 17
  78.              Direct Writing  . . . . . . . . . . . . . . . . . . . 17
  79.              Cursor and EOS Positioning  . . . . . . . . . . . . . 17
  80.              Clearing  . . . . . . . . . . . . . . . . . . . . . . 18
  81.              Scrolling . . . . . . . . . . . . . . . . . . . . . . 19
  82.              Line Drawing  . . . . . . . . . . . . . . . . . . . . 20
  83.              Custom Routines . . . . . . . . . . . . . . . . . . . 21
  84.  
  85.         4. VIRTUAL WINDOWS . . . . . . . . . . . . . . . . . . . . 23
  86.              Application . . . . . . . . . . . . . . . . . . . . . 23
  87.              Programming . . . . . . . . . . . . . . . . . . . . . 23
  88.  
  89.         5. WINDOW MANAGEMENT . . . . . . . . . . . . . . . . . . . 27
  90.              Access Methods  . . . . . . . . . . . . . . . . . . . 27
  91.              Display Control . . . . . . . . . . . . . . . . . . . 27
  92.              Write Control . . . . . . . . . . . . . . . . . . . . 28
  93.              Window Modes and Flags  . . . . . . . . . . . . . . . 29
  94.              High Speed Screen Design  . . . . . . . . . . . . . . 29
  95.              Multiple Video Pages  . . . . . . . . . . . . . . . . 30
  96.  
  97.         6. DATA MANAGEMENT . . . . . . . . . . . . . . . . . . . . 31
  98.              Data Allocation . . . . . . . . . . . . . . . . . . . 31
  99.              Record Handling . . . . . . . . . . . . . . . . . . . 31
  100.  
  101.  
  102.                                        2
  103.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  104.  
  105.  
  106.  
  107.         7. UTILITY UNITS . . . . . . . . . . . . . . . . . . . . . 34
  108.              Goof Unit . . . . . . . . . . . . . . . . . . . . . . 34
  109.              Wutil Unit  . . . . . . . . . . . . . . . . . . . . . 34
  110.  
  111.         APPENDIX A: Application Products . . . . . . . . . . . . . 36
  112.  
  113.         APPENDIX B: Revision History . . . . . . . . . . . . . . . 38
  114.  
  115.         APPENDIX C: Credits  . . . . . . . . . . . . . . . . . . . 40
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.                                        3
  164.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  165.  
  166.  
  167.    1.  I N T R O D U C T I O N
  168.  
  169.  
  170.    FEATURES
  171.  
  172.    Welcome to WNDW multi-level virtual windows!
  173.  
  174.    You have just obtained a copy of the highest performance window utilities 
  175.    available today for Turbo Pascal 5.0 (TP5).  Both novice and professional 
  176.    programmers will appreciate these simple and very powerful utilities that 
  177.    gives you full window control and management in all text modes.
  178.    
  179.    Here are some of the features you will discover:
  180.  
  181.      . Uses the powerful direct screen writing routines of 
  182.        QWIK5X.
  183.      . Up to 254 fixed or virtual windows can be on the screen at 
  184.        one time.
  185.      . Extremely high-speed virtual screens in RAM.
  186.      . Virtual windows are fully updated even if covered!
  187.      . Virtual windows have virtual titles.
  188.      . Fully supported hidden windows saved in RAM.
  189.      . Fully supports all video pages.
  190.      . Adjustable-rate moving, resizing, and scrolling.
  191.      . All windows can be randomly accessed.
  192.      . 28 window-relative writing routines.
  193.      . 15 different border styles with shadows.
  194.      . Full line drawing procedures.
  195.      . Full cursor mode control for each window.
  196.      . Writes in all text modes and column modes.
  197.      . Only 13k bytes of code if all 69 utilities are used.
  198.      . Used in all other Eagle products.
  199.  
  200.    WNDW is a very high performance window unit with high speed and tight code.  
  201.    All types of windows, including fixed or virtual, hidden or shown, work 
  202.    compatibly in the same package.  With WNDW, you can choose the absolute 
  203.    writing routines of QWIK, the window-relative writing routines of WNDW, and 
  204.    even customize your own.
  205.  
  206. |  Version 5X - This version is simply a TP5 compiled version of WNDW42.
  207. |  WNDW50 will be out at a later date with other features specific to TP5.
  208.  
  209.  
  210.    USING THE MANUALS
  211.  
  212.    Disk Based Guides - The manuals for WNDW are on disk so that you can 
  213.    conveniently scan for the topic you are seeking.  You can do this with any 
  214.    list or search utility with a search function.  You can also make a printed 
  215.    copy.  If you have not already printed this manual, refer to the READ.ME 
  216.    file for instructions.  At the present time, no bound manuals are being 
  217.    offered with registration.
  218.  
  219.    User's Guide - This manual, the one your are reading now, assumes that as a 
  220.    programmer you are already familiar with Turbo Pascal 5.0, and that you 
  221.    have a working knowledge of your disk operating system (DOS).  It also 
  222.  
  223.  
  224.    Chapter 1, Introduction                                             Page 4
  225.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  226.  
  227.  
  228.    assumes that you are familiar with QWIK screen utilities in QWIK5X.ARC.  
  229.    This manual will provide the basic instructions for creating and managing 
  230.    multi-level windows.  You can even copy examples from this file direct to 
  231.    the Turbo editor for testing.
  232.  
  233.    Reference Guide - This manual describes in detail all procedures, functions 
  234.    and variables used in WNDW.  It is a alphabetically arranged for easy 
  235.    access in a format similar to the TP5 manual.  Use this manual when you 
  236.    have become familiar with the basic principles in the User's guide.
  237.  
  238.  
  239.    LICENSING
  240.  
  241.    Registration - These routines and the documentation have been released for 
  242.    distribution as Shareware.  You have been given the chance to sample the 
  243.    full capability of WNDW without risk!  If you find that WNDW is a valuable 
  244.    tool, then you are expected to register.  You will find a reasonable 
  245.    licensing schedule found in LICENSE.ARC to meet private or commercial 
  246.    needs.  When registering, be sure to specify the version for Turbo Pascal 
  247.    (such as TP4 or TP5) you wish to receive.
  248.  
  249.    Source Code - All registered users will receive source code when the signed 
  250.    license agreement is returned with the registration.  All source code 
  251.    compiles under TP5 as well as TP4.  The compiled units in the distributed 
  252.    file were compiled with TP5 and only work in TP5.
  253.  
  254.  
  255.    CUSTOMER SERVICE
  256.  
  257.    If you have questions, comments, or suggestions, the Eagle can be contacted 
  258.    by three means - (1) CompuServe, (2) telephone, (3) The Eagle BBS, or 
  259.    (4) mail.
  260.  
  261.    CompuServe - The most dependable way to contact the Eagle is through 
  262.    CompuServe.  James (Jim) H. LeMay has written the TP5 version of WNDW.  He 
  263.    can be contacted on the Borland Forum by typing GO BPROGA from the 
  264.    CompuServe main menu.  You will enter the Forum for Turbo Pascal.  You can 
  265.    contact Jim with his PPN number of 76011,217.  Messages can also be left 
  266.    through EasyPlex.
  267.  
  268.    Telephone - Jim can also be reached by phone at (817) 735-4833 on weekdays 
  269.    and Saturday from 9:00 a.m. to 8:00 p.m CST.
  270.  
  271.    The Eagle BBS - After 01-10-89, you can also contact us on our 24-hour BBS 
  272.    at (214) 539-9878, 1200 N81.
  273.  
  274.    Mail - For registration or problems, please write:
  275.  
  276.        Eagle Performance Software
  277.        TP products
  278.        P.O. Box 122237
  279.        Ft. Worth, TX  76121-2237
  280.  
  281.    In your written request for resolving problems, be sure to include:
  282.  
  283.  
  284.  
  285.    Chapter 1, Introduction                                             Page 5
  286.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  287.  
  288.  
  289.      . A 5 1/4 inch diskette of compilable source code of the problem.
  290.      . The Eagle product and version number.
  291.      . The computer make and model.
  292.      . The type of video card, video monitor and keyboard.
  293.  
  294.    For identical Turbo C products, write:
  295.  
  296.        Eagle Performance Software
  297.        TC products
  298.        P.O. Box 292786
  299.        Lewisville, TX  75029-2786
  300.  
  301.    Or, contact Jim Gallagher at (214)-539-7855
  302.  
  303.    ASP
  304.  
  305.    WNDW is a Shareware program conforming to the standards of the Association 
  306.    of Shareware Professionals (ASP).  You can get more information about ASP 
  307.    by writing to:
  308.     
  309.      Association of Shareware Professionals
  310.      325 118th Ave. S.E., Suite 200
  311.      Bellevue, WA  98005.
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.    Chapter 1, Introduction                                             Page 6
  347.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  348.  
  349.  
  350.    2.  G E T T I N G   S T A R T E D
  351.  
  352.    This section will acquaint you with the files on distribution disk and show 
  353.    you a couple of demonstrations to quickly see what WNDW can accomplish.
  354.  
  355.  
  356.    DISTRIBUTION FILES
  357.  
  358.    In this version, WNDW5X.ARC contains:
  359.  
  360.      Read.   .me:   Note of printing instructions for manual.
  361.      KeyB    .tpu:  Keyboard unit for WDNWMGR.PAS demo.               
  362.      Goof    .pas:  Unit to display errors.
  363.      Qwik5x  .tpu:  Unit for quick screen writing.
  364.      Strs    .tpu:  Unit from QWIK5X for number-to-string conversions.
  365.      Wutil   .tpu:  Independent utilities unit used in WNDW.
  366.      W5X-var .inc:  This file is the actual source code which lists 
  367.                     all of the types, constants, and variables used 
  368.                     for WNDW5X.TPU.
  369.      Wndw5X- .pas:  Shows the interface portion of WNDW5X.
  370.      Wndw5X  .tpu:  This unit has the full power of all of its 
  371.                     capabilities.  Please note that because WNDW5X.TPU 
  372.                     uses W5X-VAR.INC, MaxWndw, MaxVirtualWndw, 
  373.                     MaxPageUsed, and the WindowNames names have all 
  374.                     been assigned.  In order to make any changes in 
  375.                     the data requirements, the complete source code 
  376.                     will be required. 
  377.      Wndw5X  .doc:  This document - a user's guide to WNDW.
  378.      WndwRef .doc:  WNDW Reference Guide document covering each 
  379.                     routine and variable in detail.
  380.      WndwDemo.pas:  Demo of WNDW5X.TPU and QWIK5X.TPU which show 
  381.                     screen design performance.
  382.      WndwMgr .pas:  Demo of full window management.
  383.      License .arc:  ARC file containing license agreement and ordering 
  384.                     details.
  385.  
  386.  
  387.    DEMONSTRATION
  388.  
  389.    To get the feeling of the speed and features of WNDW, let's run the 
  390.    demonstration programs that came with the utilities.  Do the following 
  391.    steps:
  392.  
  393.      1. Copy QWIK5X.TPU to QWIK.TPU.  
  394.      2. Copy WNDW5X.TPU to WNDW.TPU
  395.      3. Make, compile and run WNDWDEMO.PAS to get a feel for 
  396.         screen design performance and speed.  
  397.      4. Make, compile and run WNDWMGR.PAS to get a feel for true 
  398.         virtual windows and window management.  Press Alt-1 to 
  399.         access the bottom window.  With Scroll Lock on, it can be 
  400.         moved, resized and scrolled.
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.    Chapter 2, Getting Started                                          Page 7
  408.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  409.  
  410.  
  411.    3.  P R O G R A M M I N G   W I N D O W S
  412.  
  413.    This sections will get you familiar with the basics of window programming 
  414.    by starting with very basic windows and then taking you step-by-step 
  415.    through the variety of options and modes that are available.
  416.  
  417.  
  418.    BASIC PROGRAMMING
  419.  
  420.    First Program - Let's write a short program to see how simple it is to 
  421.    write with WNDW.  While in the TP editor, enter the following code:
  422.  
  423.      EXAMPLE 1:  Your first window
  424.      ----------------------------------------------------------------------
  425.      {$M 16384,8000,8000 }                                                 
  426.      uses Crt,Qwik,Wndw,Goof;
  427.      begin
  428.        InitWindow (LightGrayBG,true);    { Initialize and Clear window }
  429.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,aWindow);
  430.        WWriteC (7,'Making windows is easy!');
  431.      end.
  432.  
  433.    Assuming you have already copied QWIK5X.TPU to QWIK.TPU and WNDW5X.TPU to 
  434.    WNDW.TPU, make and run the code.  You can then see these results:
  435.  
  436.       . The base window is cleared with Black on LightGray attributes.
  437.       . The window is placed at absolute row 5, column 20
  438.       . The window size is 15 rows high and 40 columns wide.
  439.       . The window text color is White on a Blue background.
  440.       . The window border color is Cyan on a Blue background.
  441.       . The border is the Single line width style.
  442.       . The window name is aWindow.
  443.       . The message was centered on window-relative row 7.
  444.       
  445.    Row/Col vs. X/Y - You probably noticed that the row parameter is first and 
  446.    the column parameter is second.  Since WNDW is entirely for text modes, it 
  447.    is more intuitive to specify the row first and the column second just like 
  448.    any word processor.  The X/Y scheme is better suited for graphics.
  449.  
  450.    Attributes - Notice that our example uses the constant "BlueBG".  WNDW uses 
  451.    QWIK which provides eight convenient background color constants to use 
  452.    along with Turbo's 16 foreground colors.  The same names are used, but the 
  453.    "BG" suffix is added: 
  454.  
  455.       BlackBG       RedBG
  456.       BlueBG        MagentaBG
  457.       GreenBG       BrownBG
  458.       CyanBG        LightGrayBG
  459.  
  460.    These allow WNDW to make the most of Turbo's constant folding.  By simply 
  461.    adding the foreground and background constants together, the compiler saves 
  462.    the result as a single word.  And, by simply reading the MakeWindow 
  463.    statement, what you see is what you get (WYSIWYG). 
  464.  
  465.    Protected Underlay - That first program was pretty simple wasn't it?  
  466.  
  467.  
  468.    Chapter 3, Programming Windows                                      Page 8
  469.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  470.  
  471.  
  472.    Several things happened that you probably didn't notice.  The area under 
  473.    the window, called the underlay, was actually saved.  Later on when the 
  474.    window is no longer needed, it can be removed by restoring the underlay.  
  475.    This makes it just like a sheet of paper on a desk.  Let's add some 
  476.    statements to show if the underlay is really protected.  In addition, let's 
  477.    add a little more pizazz to the window by adding a shadow, zoom effect, and 
  478.    a title:
  479.  
  480.      EXAMPLE 2:  Protected underlay
  481.      ----------------------------------------------------------------------
  482.      {$M 16384,8000,8000 }                                                 
  483.      uses Crt,Qwik,Wndw,Goof;
  484.      begin
  485.        InitWindow (LightGrayBG,true); 
  486.        WWriteC (12,'Base Window');
  487.        SetWindowModes (ZoomMode+ShadowRight);
  488.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,aWindow);
  489.        TitleWindow (Top,Left,Yellow+BlueBG,' My First Window ');
  490.        WWriteC (7,'Making windows is easy!');
  491.        delay (2000);
  492.        RemoveWindow;   { Remove the window and restore underlay. }
  493.      end.
  494.  
  495.    Did you see that the message "Base Window" was still there?  In fact that 
  496.    whole entire underlay was protected because it was saved in the heap while 
  497.    we were writing on the CRT.  In addition:
  498.  
  499.       . The window modes controlled the Shadow and Zoom effect.
  500.       . The title is placed on the Top border, Left justified, with Yellow
  501.         on Blue attributes.
  502.       . The "Base Window" message was centered on window-relative row 12.
  503.  
  504.    Basic Principles - Was that simple enough for you?  Well, you'll be glad to 
  505.    know that you have already tried all the basic principles to making 
  506.    windows.  And the rest is just that easy.  But you haven't seen anything 
  507.    yet.
  508.  
  509.  
  510.    WINDOW DEFINITIONS
  511.  
  512.    Window - Just what is a window anyway?  It's an area reserved on the screen 
  513.    as a frame of reference to write text.  Right on the screen, the power of 
  514.    this program allows you to move, rearrange, hide, move, and resize, without 
  515.    losing any data.
  516.  
  517.    View - In virtual windows, this window text area is also called the view.  
  518.    More about virtual windows is explained later.
  519.  
  520.    Border - The border is the lines surrounding the window or view to clearly 
  521.    separate the window contents from other areas of the CRT.  However, a 
  522.    window does not require a border.
  523.  
  524.    Title - Conveniently, a window can be titled on the border - either the top 
  525.    or the bottom.  The title area extends the full length of the window not 
  526.    including the two vertical borders.  The title is written at a border-
  527.  
  528.  
  529.    Chapter 3, Programming Windows                                      Page 9
  530.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  531.  
  532.  
  533.    relative location.  If a window does not have a border, then the title area 
  534.    is just the top or bottom row of the window text area.
  535.  
  536.    Cursor - Each window has its own cursor location and mode (shape).
  537.  
  538.    Shadow - To give a window that off-the-screen appearance, a shadow can be 
  539.    added onto the outer edge of the window or window border.
  540.  
  541.    Generally Speaking - Throughout this document, the word "window" will 
  542.    loosely refer to all of the above parts as the full window.  It should be 
  543.    understood that all writing to the windows uses coordinates relative to the 
  544.    upper left corner of the window text area which is (1,1) exclusive of the 
  545.    border.
  546.  
  547.  
  548.    BASIC ROUTINES
  549.  
  550.    Basic Routines - There are five basic procedures that are fundamental to 
  551.    creating multi-level windows:
  552.          
  553.      InitWindow     - Initializes global data for the program.
  554.      SetWindowModes - Determines what types of windows are made.
  555.      MakeWindow     - Creates the window.
  556.      TitleWindow    - Places titles on the window.
  557.      RemoveWindow   - Removes window from CRT and memory.
  558.  
  559.    InitWindow - First, before any window procedures are used, InitWindow 
  560.    should be executed to initialize all global data for the entire programs.  
  561.    It only needs to be done once.  
  562.           
  563.      InitWindow (Wattr: integer; ClearScr: boolean)
  564.  
  565.    The initial base window has no border and the window attribute is Wattr.  
  566.    You can optionally clear the window by setting ClearScr to TRUE.  The 
  567.    procedure initializes over 50 variables.  For details, you can examine the 
  568.    source code.
  569.  
  570.  
  571.    MAKEWINDOW PARAMETERS
  572.  
  573.    Declaration - The MakeWindow procedure actually makes the window on the 
  574.    screen.  Let's take a look at its declaration:
  575.  
  576.       MakeWindow (Row,Col,Rows,Cols: byte; Wattr,Battr: integer;
  577.                   BrdrSel: Borders; WindowName: WindowNames)
  578.  
  579.    The procedure's parameters control location, size, attributes, border 
  580.    style, and window name.  Notice that the size used Rows/Cols rather than 
  581.    another (Row2,Col2) coordinate.  This makes it very easy to change the 
  582.    location without having to recalculate the size.  
  583.  
  584.    Attributes - Wattr and Battr are the attributes for the window text area 
  585.    and border, respectively.  The attributes that are recognized are the same 
  586.    ones used in QWIK - even SameAttr is supported.
  587.  
  588.  
  589.  
  590.    Chapter 3, Programming Windows                                      Page 10
  591.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  592.  
  593.  
  594.    Border Styles - There are 15 different border styles that can be used for 
  595.    the border, including two custom borders and even no border at all.  Here 
  596.    is the list of Border names that are predefined:
  597.  
  598.      NoBrdr         - No border at all.  Just the text area.
  599.      BlankBrdr      - Blank character on all sides.
  600.      SingleBrdr     - Single lines on all sides.
  601.      DoubleBrdr     - Double lines on all sides.
  602.      HdoubleBrdr    - Horizontal double lines.  Single vertical lines.
  603.      VdoubleBrdr    - Vertical double lines.  Single horizontal lines.
  604.      SolidBrdr      - Solid box character on all sides.
  605.      EvenSolidBrdr  - Vertical solid box.  Horizontal half box.
  606.      ThinSolidBrdr1 - Half box on all sides.  Squeezed horizontally.
  607.      ThinSolidBrdr2 - Half box on all sides.  Squeezed vertically.
  608.      LhatchBrdr     - Light hatch character on all sides.
  609.      MhatchBrdr     - Medium hatch character on all sides.
  610.      HhatchBrdr     - Heavy hatch character on all sides.
  611.      UserBrdr1      - User defined border.
  612.      UserBrdr2      - User defined border.
  613.  
  614.    All of the borders except the user borders are reserved for use in future 
  615.    Eagle products.  UserBrdr1 and UserBrdr2 may be customized to your needs.  
  616.    Each border has 15 different parts for the line drawing set including tees 
  617.    and interior lines.
  618.  
  619.    Tip: Hatch Borders - Since MDA and VGA both use a 9x16 character cell size, 
  620.    the hatch characters (ASCII 176, 177, 178) are only 8x16 in a 9x16 cell.  
  621.    This unfortunately produces a horizontal gap between the characters not 
  622.    seen on the CGA.  Be aware of the effect.
  623.  
  624.    Window Name - The name of each window should be different in order to 
  625.    uniquely identify the window for window management.  But since our simple 
  626.    test program only displayed the window momentarily, the window name is not 
  627.    significant and did not need to be unique.  So, the generic name "aWindow" 
  628.    was used.  The name Window0 is used to identify the initial base window 
  629.    which is the full CRT screen.
  630.  
  631.  
  632.    WINDOW MODES
  633.  
  634.    Defaults - Without needing to specify anything, the window is created with 
  635.    several defaults.  Let's see what they are:
  636.  
  637.      . Fixed size and placed absolute to the CRT.
  638.      . Shown on the CRT.
  639.      . The underlay is saved.
  640.      . No shadow or zoom effect.
  641.      . No virtual screen.
  642.      . Cursor is turned on with the default cursor mode.
  643.      . Window is cleared.
  644.      . Moving and Accessing is permitted.
  645.  
  646.    Well, if these are all defaults, then that means they can be changed.  And 
  647.    they can.  We've already found out how to add shadow and zoom.  Let's try 
  648.    changing some others and see what happens.  Enter the following code into 
  649.  
  650.  
  651.    Chapter 3, Programming Windows                                      Page 11
  652.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  653.  
  654.  
  655.    the editor:
  656.  
  657.      EXAMPLE 3:  Different modes and a hidden window
  658.      ----------------------------------------------------------------------
  659.      {$M 16384,8000,8000 }                                                 
  660.      uses Crt,Qwik,Wndw,Goof;                                     
  661.      begin                                                                 
  662.        InitWindow (LightGrayBG,true);
  663.        SetWindowModes (HiddenMode or ZoomMode or CursorOffMode);
  664.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  665.        WWriteC (12,'Where is it?');
  666.        WriteToHidden (Window1);     { Write to the hidden window.}
  667.        TitleWindow (Bottom,Right,Yellow+BlueBG,' My Second Window ');
  668.        WWriteC (3,'Here it is ...');
  669.        WBrdrH (7);                  { Add an extra horizontal border.}
  670.        WWriteC (10,'It was hidden!');
  671.        delay (2000);
  672.        ShowWindow (Window1);        { Put it back on the screen. }
  673.        delay (2000);
  674.        RemoveWindow;
  675.      end.
  676.  
  677.    When you run it, the window is immediately created.  But instead we see the 
  678.    message "Where is it?".  And to answer that question, the window was 
  679.    created in RAM instead of on the CRT.  In addition, the code also wrote 
  680.    messages direct to the hidden window.  The window remains hidden until it 
  681.    is called which we did with ShowWindow.  Afterward, we removed it from 
  682.    memory with RemoveWindow.  I'll bet you didn't know that you have already 
  683.    done some writing to a virtual screen.  That's right - the hidden window 
  684.    was a virtual screen!  Pretty easy, huh?  And it was done by simply setting 
  685.    a mode.  
  686.  
  687.    SetWindowModes - This procedure can be used any time prior to MakeWindow.  
  688.    It only needs to be done once since the value is retained in WindowModes 
  689.    until changed again.
  690.  
  691.    List of Modes - Did you notice the zoom effect this time and that the 
  692.    cursor was turned off?  Let's take a look at all the available modes:
  693.  
  694.      Mode Constant  Description
  695.      -------------  -----------------------------------------------
  696.      ShadowLeft     Shadow on the left side                             
  697.      ShadowRight    Shadow on the right side                            
  698.      ZoomMode       Zoom effect on Make, Show and AccessWindow                
  699.      CursorOffMode  Leaves cursor off for window                        
  700.      RelMode        Window-relative frame of reference, no underlay     
  701.      PermMode       Can't be moved or removed, no underlay              
  702.      SeeThruMode    Doesn't clear screen inside window                  
  703.      HiddenMode     Create window as hidden                          
  704.      VirtualMode    Create Virtual window and screen 
  705.      NoHideMode     Ignores request to hide window                      
  706.      NoAccessMode   Ignores request to access window                    
  707.      NoMoveMode     Ignores request to move/resize window                   
  708.  
  709.    We've already seen what the first four can do.  Let check to see what the 
  710.  
  711.  
  712.    Chapter 3, Programming Windows                                      Page 12
  713.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  714.  
  715.  
  716.    others can do.
  717.  
  718.    ShadowLeft/ShadowRight - When placed on the CRT, the window gets a shadow 
  719.    on either the left or right side as well as the bottom.  For good human 
  720.    factors, it is recommended that the shadow only be used for the top window 
  721.    for clarity.  They are fully supported at any level for serial-access 
  722.    windows.  (However, for random-access, the shadows are permitted, but if a 
  723.    window is pulled out from under it, the corners will not be updated at that 
  724.    moment.)  Tip: Place windows with shadows correctly to prevent wrap around.
  725.  
  726.    ZoomMode - When a window is created, shown, or accessed on the CRT with 
  727.    this mode, it produces a zoom effect.  It is conveniently suppressed for 
  728.    hidden windows.
  729.  
  730.    RelMode - This is the simplest of all modes.  It enables you to set up a 
  731.    window within a window.  It simply overwrites the window, but produces a 
  732.    handy window-relative frame of reference to draw borders, write text or 
  733.    whatever.  It's a worry-free mode.  To get back to the parent window, just 
  734.    use RemoveWindow or switch to another window.  RelMode is only temporary 
  735.    and no stats are saved.  Let's modify the last example and try this out:
  736.  
  737.      EXAMPLE 4:  RelMode window
  738.      ----------------------------------------------------------------------
  739.      {$M 16384,8000,8000 }                                                 
  740.      uses Crt,Qwik,Wndw,Goof;                                     
  741.      begin                                                                 
  742.        InitWindow (LightGrayBG,true);
  743.        SetWindowModes (HiddenMode or ZoomMode or CursorOffMode);
  744.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  745.        WWriteC (12,'Where is it?');
  746.        WriteToHidden (Window1);     { Write to the hidden window.}
  747.        TitleWindow (Bottom,Right,Yellow+BlueBG,' My Second Window ');
  748.        SetWindowModes (RelMode);
  749.        MakeWindow (3, 4, 3,32,SameAttr,SameAttr,HdoubleBrdr,aWindow);
  750.        TitleWindow (Top,Center,SameAttr,' My Answer: ');
  751.        WWriteC (1,'Here it is ...');
  752.        delay (2000);
  753.        ShowWindow (Window1);        { Put it back on the screen. }
  754.        WWriteC (10,'It was hidden!');
  755.      end.
  756.  
  757.    Notice that the (Row,Col) location was relative to the parent window, 
  758.    Window1.  Even the title as well as the text was placed in RelMode.  Once 
  759.    the window was shown, the window coordinates and modes were restored to the 
  760.    parent window.  The message appeared correctly on row 10 of the parent 
  761.    window.  Notice also that we didn't bother to use RemoveWindow since we 
  762.    were finished and wanted to take a closer look at what we created.
  763.  
  764.    PermMode - When creating your initial screen for a program, the underlay 
  765.    probably does not need to be saved.  This mode enables you to create 
  766.    windows without saving the underlay so the screen is simply overwritten  - 
  767.    perfect for initial screens by increasing speed and saving memory.  All the 
  768.    window stats are still saved for future use.  Keep in mind two rules for 
  769.    this mode.  First, all PermMode windows must be the first ones created.  
  770.    And second, use discretion when accessing the window to make sure it is not 
  771.  
  772.  
  773.    Chapter 3, Programming Windows                                      Page 13
  774.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  775.  
  776.  
  777.    covered by another window before writing to it.  Let's try an example:
  778.  
  779.      EXAMPLE 5:  PermMode window
  780.      ----------------------------------------------------------------------
  781.      {$M 16384,8000,8000 }                                                 
  782.      uses Crt,Qwik,Wndw,Goof;                                     
  783.      begin                                                                 
  784.        InitWindow (LightGrayBG,false);   { No need to clear screen }
  785.        SetWindowModes (PermMode);
  786.        MakeWindow ( 1, 1,12,80,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  787.        TitleWindow (Top,Left,Yellow+BlueBG,' Input Window ');
  788.        MakeWindow (13, 1,13,80,White+GreenBG,GreenBG,HdoubleBrdr,Window2);
  789.        TitleWindow (Top,Left,Yellow+GreenBG,' Output Window ');
  790.        WWrite ( 1, 1,'Output data.');
  791.        AccessWindow (Window1);
  792.        WWrite ( 1, 1,'Input data.');
  793.      end.
  794.  
  795.    Since we were designing the initial screen, the ClearScr parameter in 
  796.    InitWindow was set to FALSE.  Did you notice that writing back to Window1 
  797.    was no problem?   You've just had your first shot at window management!  
  798.    AccessWindow will let you write to any window by name.  But if RemoveWindow 
  799.    is used on PermMode windows, the window record is simply dropped from the 
  800.    stack and the screen appears unaltered.
  801.  
  802.    SeeThruMode - If there is a portion of the current screen that needs to be 
  803.    captured to become a part of the window itself, this mode creates the 
  804.    border but simply skips clearing contents the window.  This is done only 
  805.    when the window is first created.
  806.  
  807.      EXAMPLE 6:  SeeThruMode window
  808.      ----------------------------------------------------------------------
  809.      {$M 16384,8000,8000 }                                                 
  810.      uses Crt,Qwik,Wndw,Goof;                                     
  811.      begin                                                                 
  812.        InitWindow (LightGrayBG,true); 
  813.        WWriteC (12,'My message');
  814.        SetWindowModes (SeeThruMode);
  815.        MakeWindow (10,26, 5,30,White+BlueBG,Cyan+BlueBG,SingleBrdr,aWindow);
  816.        TitleWindow (Top,Left,Yellow+BlueBG,' Captured Text ');
  817.        delay (2000);
  818.        RemoveWindow;
  819.      end.
  820.  
  821.    When running this program, it appears that a border was just placed over 
  822.    the message "My message".  But in fact, it's really a part of the new top
  823.    window.  So, if the window is moved, the contents move as well.
  824.  
  825.    HiddenMode - In example 3, we plunged right into making hidden windows and 
  826.    it was easy, too.  As it was explained, the hidden window is actually a 
  827.    virtual window in the heap to which you can write at any time.  Since 
  828.    virtual screen writing is so very quick, you can even design full screens 
  829.    in an instant and then display them on the CRT.  Once a window is shown, it 
  830.    can always be hidden again with HideWindow.  This is explained further in 
  831.    Section 5 under Window Management.
  832.  
  833.  
  834.    Chapter 3, Programming Windows                                      Page 14
  835.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  836.  
  837.  
  838.  
  839.    VirtualMode - This mode is very simple but powerful and enables you to 
  840.    create a virtual window.  A virtual screen is kept in RAM, but we can view 
  841.    any portion of it on the CRT.  As you would hope, it's still quite simple:
  842.  
  843.      EXAMPLE 7:  VirtualMode window
  844.      ----------------------------------------------------------------------
  845.      {$M 16384,8000,8000 }                                                 
  846.      uses Crt,Qwik,Wndw,Goof;                                     
  847.      begin                                                                 
  848.        InitWindow (LightGrayBG,true); 
  849.        SetWindowModes (VirtualMode);
  850.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  851.        WriteToVirtual (Window1);
  852.        TitleWindow (Top,Left,Yellow+BlueBG,' Virtual Window ');
  853.        WWrite ( 1, 1,'Upper left corner');
  854.        WWriteC (7,'This message is centered on the screen');
  855.        VUpdateWindow;            { Update the complete window on the CRT. }
  856.        WriteToCRT;               { Return to writing on the CRT. }
  857.      end.
  858.  
  859.    VUpdateWindow is the workhorse for virtual windows.  It copied a portion of 
  860.    the virtual screen, the virtual titles, and the cursor location back on the 
  861.    CRT.  You probably noticed that the long message seemed to be cut off.  But 
  862.    actually we are only looking at a portion of an 80x25 virtual screen.  So 
  863.    the message was indeed centered.  You can write direct to the virtual 
  864.    screen and view any portion you want.  We have just sampled some of the 
  865.    most powerful features of WNDW with very little effort.
  866.  
  867.    Restrictive Modes - NoHideMode, NoAccessMode, and NoMoveMode are modes that 
  868.    restrict window management.  These modes are covered in the Window 
  869.    Management section.
  870.  
  871.    Back to Defaults - What about getting back to the default modes after they 
  872.    have been changed?  Just use SetWindowModes (0).
  873.  
  874.    Combinations - Just about any combination of modes can put together.  Just 
  875.    sum them together in the SetWindowModes procedure.  However, there are some 
  876.    combinations that will not be valid.  In fact, the procedure corrects your 
  877.    mistakes.  Here's a list of the modes showing invalid combinations:
  878.  
  879.      Set Mode       Invalid Combination With     Correction
  880.      -------------  ---------------------------  -------------------
  881.      ShadowLeft     ShadowRight                  ShadowRight
  882.      ShadowRight    ShadowLeft                   ShadowRight
  883.      ZoomMode       SeeThruMode                  Ignores ZoomMode
  884.      RelMode        Hidden, Virtual or PermMode  RelMode
  885.      PermMode       HiddenMode                   PermMode
  886.                     RelMode                      RelMode
  887.      SeeThruMode    ZoomMode                     Ignores ZoomMode
  888.      HiddenMode     RelMode or PermMode          RelMode or PermMode
  889.      VirtualMode    RelMode                      RelMode
  890.  
  891.  
  892.  
  893.  
  894.  
  895.    Chapter 3, Programming Windows                                      Page 15
  896.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  897.  
  898.  
  899.    CURSOR MODES
  900.  
  901.    Every Window - WNDW fully supports the cursor mode control of QWIK.  In 
  902.    fact, every window has its own cursor mode.  The setting is controlled by 
  903.    SetCursorDefault.  Here's how it works:
  904.  
  905.      EXAMPLE 8:  Cursor modes in each window
  906.      ----------------------------------------------------------------------
  907.      {$M 16384,8000,8000 }                                                 
  908.      uses Crt,Qwik,Wndw,Goof;                                     
  909.      begin                                                                 
  910.        InitWindow (LightGrayBG,true); 
  911.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  912.        SetCursorDefault (CursorBlock);
  913.        MakeWindow (9,30,15,40,White+BrownBG,BrownBG,EvenSolidBrdr,Window2);
  914.        WWrite ( 1, 1,'Upper left corner');
  915.        GotoEos;
  916.        delay (2000);
  917.        RemoveWindow;
  918.        delay (2000);
  919.        RemoveWindow;
  920.      end.
  921.  
  922.    When you ran this code, you noticed that top window had a block cursor.  
  923.    When the window was removed, the cursor mode was restored to new top 
  924.    window as an underline.  Just like SetWindowModes, the value is saved in 
  925.    CursorDefault until changed.
  926.  
  927.    Initial Window - InitWindow sets CursorDefault to the current cursor mode 
  928.    which is used for all subsequent windows and Window0.  If you even want 
  929.    Window0 to have a different cursor mode and default, simply use 
  930.    Qwik.SetCursor before InitWindow.
  931.  
  932.    CursorOffMode - So, what's the difference between using CursorOffMode and 
  933.    using SetCursorDefault (CursorOff)?  For technical reasons, in virtual 
  934.    windows, the cursor could be turned on and off.  If the setting of 
  935.    CursorOff is used, then the cursor could be turned on having an overbar 
  936.    cursor ($0000).  It's easier to use CursorOffMode.
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.    Chapter 3, Programming Windows                                      Page 16
  957.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  958.  
  959.  
  960.    3.  W R I T I N G   T O   W I N D O W S 
  961.  
  962.    WNDW has several window-relative routines designed to write in the windows, 
  963.    including direct writing, cursor and EOS positioning, clearing, scrolling, 
  964.    and line drawing.  They work in all types of windows, including hidden and 
  965.    virtual.  To do this, the routines access the top window record (TWS or 
  966.    TopWndwStat) that keeps information about the current window.  For a 
  967.    breakdown on the window record, see Data Structure in WNDWREF.DOC.  Each of 
  968.    these groups of routines are discussed below.
  969.  
  970.  
  971.    DIRECT WRITING
  972.  
  973.    Window Relative - Rather than using Qwrite to write to windows, three 
  974.    routines are provided to use window-relative coordinates.  You have already 
  975.    used two of them.  The attribute used is the window attribute TWS.WndwAttr.
  976.  
  977.      WWrite   (Row,Col: byte; aStr: string)
  978.      WWriteC  (Row: byte; aStr: string)        
  979.      WWriteA  (Row,Col: byte; ArrayLength: word; VAR aStr)
  980.  
  981.    WWriteC centers the string within the window while WWriteA is for arrays 
  982.    or substrings.  These routines are actually externals that interface the 
  983.    QWIK routines using TWS.
  984.  
  985.    QWIK Support - You will be pleased to know that QWIK is fully integrated 
  986.    and supported in WNDW like your favorite use of SameAttr and the EOS 
  987.    marker.  Wherever an attribute is needed, SameAttr can be used.  And all 
  988.    the window-relative writing routines support the EOS.  For example, to 
  989.    chain after a WWrite statement, just do the following:
  990.  
  991.      WWrite (1,2,'My message');
  992.      QwriteEos (SameAttr,' is here');
  993.  
  994.    This would write the message "My message is here" on window-relative row 1, 
  995.    column 2, also indicated as (1,2), with the current window attribute.
  996.  
  997.    Changing Attributes - Suppose you do not want to use the current window 
  998.    attribute.  How can it be altered?  The QwriteEos example above is one way.  
  999.    But since the original window attribute is saved in TWS.OrigAttr, it can be 
  1000.    temporarily be changed by doing the following:
  1001.  
  1002.      with TWS do
  1003.        begin
  1004.          WndwAttr := NewAttr;       { Assign new attribute }
  1005.          WWrite (1,1,'New Attribute'); 
  1006.          WndwAttr := OrigAttr;      { Restore window attribute }
  1007.        end;
  1008.  
  1009.  
  1010.    CURSOR AND EOS POSITIONING
  1011.  
  1012.    WNDW has eight routines to locate and move either the cursor or the EOS 
  1013.    marker relative to the current window.
  1014.  
  1015.  
  1016.  
  1017.    Chapter 3, Programming Windows                                      Page 17
  1018.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1019.  
  1020.  
  1021.  
  1022.    Cursor Location - Just like WhereR/WhereC, the following functions return 
  1023.    the current cursor location:
  1024.  
  1025.      WWhereR - Window-relative row.
  1026.      WWhereC - Window-relative column.
  1027.  
  1028.    Cursor Movement - Similar to GotoRC and GotoEos, the following procedures 
  1029.    move the cursor:
  1030.  
  1031.      WGotoRC  - Move to window-relative row and column.
  1032.      WGotoEos - Move cursor to match EOS marker location.
  1033.  
  1034.    So, what's the difference between GotoEos and WGotoEos?  The latter does 
  1035.    two more operations - (1) the cursor location is saved in TWS, and (2) the 
  1036.    cursor mode is tested in virtual windows to be turned on or off.  To be 
  1037.    consistent in windows, it is easier to use WGotoEos.
  1038.  
  1039.    EOS Location - Similar to EosR and EosC, the following functions return the 
  1040.    current EOS location:
  1041.  
  1042.      WEosR - Window-relative row.
  1043.      WEosC - Window-relative column.
  1044.  
  1045.    EOS Movement - Similar to EosToRC and QEosLn, the following procedures move 
  1046.    the EOS marker:
  1047.  
  1048.      WEosToRC - Move EOS to window-relative row and column.
  1049.      WEosLn   - Move EOS to column 1 of the next row with a possible 
  1050.                 scroll if past the last window row.
  1051.  
  1052.  
  1053.    CLEARING
  1054.  
  1055.    WNDW provides seven window-relative routines for clearing portions of the 
  1056.    window including lines, titles, fields, and even the full window with the 
  1057.    window attribute TWS.WndwAttr.  SameAttr becomes very handy when complex 
  1058.    attribute fields have already been designed into the window.
  1059.  
  1060.      WClrScr      - Clears entire window.
  1061.      WClrTitle    - Clears entire title given Top or Bottom.
  1062.      WClrLine     - Clears an entire row.
  1063.      WClrEol      - Clears a row to End-Of-Line given a (Row,Col).
  1064.      WClrEos      - Clears a row from EOS to EOL.
  1065.      WClrField    - Clears a field given a (Row,Col).
  1066.      WClrFieldEos - Clears a field at EOS.
  1067.  
  1068.    Each of these procedure places the EOS marker at the beginning of the 
  1069.    cleared area for convenient chaining.  (WClrTitle does not alter EOS.)  The 
  1070.    latter four procedures also provide an optional attribute change.  Here are 
  1071.    some examples with a variety of ways to enter data using many of the above 
  1072.    window-relative routines:
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.    Chapter 3, Programming Windows                                      Page 18
  1079.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1080.  
  1081.  
  1082.      EXAMPLE 9:  Window-relative writing routines
  1083.      ----------------------------------------------------------------------
  1084.      {$M 16384,8000,8000 }
  1085.      uses Crt,Qwik,Strs,Wndw,Goof;
  1086.      var
  1087.        s1,s2,s3: string;
  1088.        r1,r2:    real;
  1089.        Ch: char;
  1090.      begin
  1091.        InitWindow (LightGrayBG,true);
  1092.        MakeWindow (5,20,15,40,White+BlueBG,Cyan+BlueBG,SingleBrdr,Window1);
  1093.        s1 := ' a:\long\long\filename';
  1094.        s2 := ' a:\shorter\filename';
  1095.        s3 := ' error message';
  1096.        r1 := 1.0;
  1097.        r2 := 14.33e3;
  1098.        WWrite    ( 2, 2,'File name: ');
  1099.        WClrEos   (LightGrayBG);              { Clear first field }
  1100.        QwriteEos (SameAttr,s1);              { Put in file name }
  1101.        WWrite    ( 3, 2,'Status');
  1102.        WClrField ( 3,13,20,LightGrayBG);     { Clear second field }
  1103.        QwriteEos (SameAttr,s3);              { Put in status message }
  1104.        WWrite    ( 4, 2,'Quantity:  ');
  1105.        WClrFieldEos (20,LightGrayBG);        { Clear third field }
  1106.        QwriteEos (SameAttr,StrRFD(r1,19,1)); { Put in formatted data }
  1107.        EosToRCrel (0,-1);                    { Shift EOS back one space }
  1108.        WGotoEos;
  1109.        TitleWindow (Bottom,Center,Yellow+BlueBG+Blink,' Press any key ');
  1110.        repeat
  1111.          Ch := ReadKey;
  1112.        until Ch<>#00;
  1113.        WClrTitle (Bottom);
  1114.        TWS.WndwAttr := SameAttr;        { Keeps field attributes intact }
  1115.        WWrite  ( 2,13,s2);
  1116.        WClrEos (SameAttr);              { Clears remainder of long filename }
  1117.        WClrEol ( 3,13,SameAttr);        { Clears beyond field, But A OK! }
  1118.        WWrite  ( 4,13,StrRFD(r2,19,1)); { Overwrites new data }
  1119.        TWS.WndwAttr := TWS.OrigAttr;    { Restore window attribute }
  1120.      end.
  1121.  
  1122.    When running this example, the window will display the formatted data in 
  1123.    their fields.  Then press a key as requested.  Then the fields are updated 
  1124.    with new data.  Notice that the fields are only overwritten and not cleared 
  1125.    first.  This produces the best human factors by appearing flawless.
  1126.  
  1127.  
  1128.    SCROLLING
  1129.  
  1130.    Some operations may require scrolling all or just portions of a window.  
  1131.    WNDW has four routines to do this, and, like all other WNDW routines, they 
  1132.    operate in all windows and video pages at the highest speed without flicker 
  1133.    or snow.
  1134.  
  1135.    Full Window - To scroll the entire window, two routines scroll the window 
  1136.    up or down.  You may also want to consider the conditional scroll of 
  1137.  
  1138.  
  1139.    Chapter 3, Programming Windows                                      Page 19
  1140.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1141.  
  1142.  
  1143.    WEosLn:
  1144.  
  1145.      WScrollUp   - Scrolls window up.
  1146.      WScrollDown - Scrolls window down.
  1147.  
  1148.    Partial Window - Just like InsLine and DelLine, these two routines insert 
  1149.    and delete lines by specifying the row.
  1150.  
  1151.      WDelLine - Deletes the specified row scrolling the remainder up.
  1152.      WInsLine - Inserts the specified row scrolling the remainder down.
  1153.  
  1154.  
  1155.    LINE DRAWING
  1156.  
  1157.    The border alone is not sufficient for the design of many windows that need 
  1158.    to be partitioned in a logical manner.  WNDW has six procedures to 
  1159.    completely partition any window - three are for extending the border and 
  1160.    three are for a separate line drawing set for the inside window.
  1161.  
  1162.    Border Drawing - The following procedures can easily add an extra partition 
  1163.    to the window by using the current border style (TWS.WSbrdr) and the border 
  1164.    attribute (TWS.BrdrAttr):
  1165.  
  1166.      WBrdrH    - draws a horizontal partition at the given row complete with 
  1167.                  tees.
  1168.      WBrdrV    - draws a vertical partition at the given columns complete with 
  1169.                  tees.
  1170.      WBrdrPart - places a single border part at the given row and column 
  1171.                  usually used for a cross or tee.
  1172.  
  1173.    Line Drawing - When a window is created, the line drawing set (TWS.WSline) 
  1174.    is the same as the border style (TWS.WSbrdr) but can freely be changed.  
  1175.    The following procedures can easily add an extra line within the window by 
  1176.    using the line drawing set and the current window attribute (TWS.WndwAttr):
  1177.  
  1178.      WLineH    - draws just a horizontal line at the given (Row,Col) repeated 
  1179.                  for a number of columns.
  1180.      WLineV    - draws just a vertical line at the given (Row,Col) repeated 
  1181.                  for a number of columns.
  1182.      WLinePart - places a single line part at the given row and column usually 
  1183.                  used for a cross or tee.
  1184.  
  1185.    Acronyms - To make it easy to remember each individual part of a border or 
  1186.    line set, each part has its own acronym.  For example, BrdrTL means the Top 
  1187.    Left border part.  Here are the parts in their relative positions and their 
  1188.    definitions:
  1189.  
  1190.      Relative Position       The first letter of the border acronym mean:
  1191.      ------------------         T = top         B = bottom
  1192.      TL  TH  TT  TH  TR         V = vertical    H = horizontal
  1193.      LV      VL      RV         L = left        R = right
  1194.      LT  HL  CL  HL  RT         C = cross
  1195.      LV      VL      RV      The second letter is the same except for:
  1196.      BL  BH  BT  BH  BR         T = tee         L = line
  1197.  
  1198.  
  1199.  
  1200.    Chapter 3, Programming Windows                                      Page 20
  1201.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1202.  
  1203.  
  1204.  
  1205.    Example - Let's see if we can try some screen design with these routines 
  1206.    with this example:
  1207.  
  1208.      EXAMPLE 10:  Screen design
  1209.      ----------------------------------------------------------------------
  1210.      {$M 16384,8000,8000 }
  1211.      uses Crt,Qwik,Wndw,Goof;
  1212.      begin
  1213.        InitWindow (LightGrayBG,true);
  1214.        MakeWindow ( 5,19,17,41,GreenBG,White+GreenBG,VdoubleBrdr,Window1);
  1215.        TWS.WSline := SingleBrdr;   { Don't want VdoubleBrdr }
  1216.        WLineH ( 4, 1,TWS.Wcols);   { Use Wcols for full window width }
  1217.        WLineH (12, 1,TWS.Wcols);
  1218.        WBrdrH (8);
  1219.        WBrdrV (20);
  1220.        WBrdrPart ( 8,20,BrdrCL);   { For the Cross Line }
  1221.      end.
  1222.  
  1223.    When you see this executed, it is apparent that the borders are connected 
  1224.    with tees.  Notice that the line set uses the window attribute.  I'll bet 
  1225.    you didn't know screen design could be this easy!  Why use compressed 
  1226.    screens?
  1227.  
  1228.  
  1229.    CUSTOM ROUTINES
  1230.  
  1231.    You can make your own custom routines to be window-relative by using the 
  1232.    current window record.  This topic will get you familiar with the window 
  1233.    coordinates and guide you through an example.
  1234.  
  1235.    Coordinates - The top window record has two sets of coordinates - one set 
  1236.    includes the border and the other excludes it.  Here are the field 
  1237.    identifiers for the ones including the border:
  1238.      
  1239.      WSrow  - Row of the top border.
  1240.      WScol  - Column of the left border.
  1241.      WSrows - Number of rows from border to border.
  1242.      WScols - Number of columns from border to border.
  1243.      WSrow2 - Row of the bottom border.
  1244.      WScol2 - Column of the right border.
  1245.  
  1246.    The "WS" acronym means WndwStat which was used to create the window.  But 
  1247.    usually you would want the coordinate for the text window exclusive of the 
  1248.    border ("W" acronym) and here are those field identifiers:
  1249.  
  1250.      Wrow  - Top row of the window.
  1251.      Wcol  - Left column of the window.
  1252.      Wrows - Number of rows in the window.
  1253.      Wcols - Number of columns in the window.
  1254.      Wrow2 - Bottom row of the window.
  1255.      Wcol2 - Right column of the window.
  1256.  
  1257.    For example, to access the top row of the window, use TWS.Wrow.  This uses 
  1258.    the same amount of code as a simple variable.
  1259.  
  1260.  
  1261.    Chapter 3, Programming Windows                                      Page 21
  1262.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1263.  
  1264.  
  1265.  
  1266.    Example - You may have noticed that there is no Wfill procedure included in 
  1267.    WNDW.  That's because it's so simple to customize your own.  Let's try to 
  1268.    write one:
  1269.  
  1270.      procedure Wfill (Row,Col,Rows,Cols: byte; Ch: char);
  1271.      begin
  1272.        with TWS do   
  1273.          Qfill (pred(Wrow+Row),pred(Wcol+Col),Rows,Cols,WndwAttr,Ch);
  1274.      end.
  1275.  
  1276.    You can do the same to all your routines and they can work in any displayed 
  1277.    or hidden window, or even virtual screens.
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.    Chapter 3, Programming Windows                                      Page 22
  1323.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1324.  
  1325.  
  1326.    4.  V I R T U A L  W I N D O W S
  1327.  
  1328.    Now that you have a good idea of what windows can do, virtual windows will 
  1329.    add a greater magnitude of power and flexibility to your windows with no 
  1330.    more effort than what has already been covered.  This section shows the 
  1331.    practical applications and how to program them.
  1332.  
  1333.  
  1334.    APPLICATION
  1335.  
  1336.    This topic will help you decide when virtual windows can meet the needs of 
  1337.    your programming application.
  1338.  
  1339.  
  1340.    More Power - The default mode for making windows is a fixed-size window 
  1341.    with all of the text displayed.  But what if you want variable sized 
  1342.    windows or want to write to windows that are not displayed or even covered?  
  1343.    Virtual windows to the rescue!  They handle this automatically.
  1344.  
  1345.    Definition - What is a virtual window anyway?  There are two parts to a 
  1346.    virtual window - the screen and the view.  The screen part is written in 
  1347.    RAM while the view is seen on the CRT.  So, we can write to the screen at 
  1348.    any time and show only a portion to the CRT as required!
  1349.  
  1350.    Advantages - Since QWIK has already developed low-level tools for virtual 
  1351.    screens, WNDW uses them to create quick virtual windows.  Here's the 
  1352.    advantages:
  1353.  
  1354.      . Variable row-by-column screen size up to 64k.
  1355.      . Extremely high speed in RAM.
  1356.      . Number of screens only limited by memory.
  1357.      . Can update windows even if they are overlapped, covered, or hidden.
  1358.      . The view can be resized without losing text.
  1359.      . The screen allows wraparound.
  1360.      . Can access any screen at any time.
  1361.  
  1362.    If your application has operations in one window that affects others, then 
  1363.    virtual windows are essential.  An example of this is the Turbo Debugger 
  1364.    environment where operations in the CPU window affect items in the source 
  1365.    code and watch windows.
  1366.  
  1367.  
  1368.    PROGRAMMING
  1369.  
  1370.    Remember, we already did some virtual window programming back in Example 7 
  1371.    and there wasn't anything to it.  Now, in this section, you will learn 
  1372.    additionally how to make, write, update, view, and resize a virtual window.
  1373.  
  1374.    Compiling - To include the virtual window code in the unit, the conditional 
  1375.    directive AddVirtual must be defined.  The distributed unit already has  
  1376.    defined it for you.  If you have the source code, the directive is found at 
  1377.    the top of WNDW5X.PAS.  To eliminate the code when virtual windows are not 
  1378.    needed, simply remove the "$" in front of "Define AddVirtual".
  1379.  
  1380.    Creating - All we have to do to make a virtual window is use VirtualMode 
  1381.  
  1382.  
  1383.    Chapter 4, Virtual Windows                                          Page 23
  1384.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1385.  
  1386.  
  1387.    in the SetWindowModes procedure.  The default size for screen is the 
  1388.    current screen dimensions as set by InitWindow.  But suppose a different 
  1389.    size is needed.  How can that be changed?  SetVirtualSize controls the 
  1390.    screen size.  Here's an example:
  1391.  
  1392.      EXAMPLE 11:  Virtual window sizing
  1393.      ----------------------------------------------------------------------
  1394.      {$M 16384,10000,10000 }
  1395.      uses Crt,Qwik,Wndw,Goof;
  1396.      begin
  1397.        InitWindow (LightGrayBG,true);
  1398.        SetWindowModes (VirtualMode);
  1399.        SetVirtualSize (20,100);                   { 20 rows by 100 columns }
  1400.        MakeWindow (5,20,15,40,LightCyan+BlueBG,White+BlueBG,SingleBrdr,
  1401.                    Window1);
  1402.        WriteToVirtual (Window1);         { Now write to the virtual screen }
  1403.        Qfill (1,1,CRTrows,CRTcols,SameAttr,'?');   { Fill screen with data }
  1404.        TitleWindow (Top,Left,Yellow+BlueBG,' Virtual Window ');
  1405.        WWrite ( 4, 8,' >');                      { Let's get our bearings. }
  1406.        QwriteEos (TWS.WndwAttr+blink,'+');
  1407.        QwriteEos (SameAttr,'<- Row 4, Column 10 ');
  1408.        VUpdateWindow;             { Update the complete window on the CRT. }
  1409.        delay (2000);               { Make sure we see where the cursor is. }
  1410.        RemoveWindow;
  1411.      end.
  1412.  
  1413.    Notice that we chose a 20x100 screen, but what is seen on the CRT is only 
  1414.    15x40 which is set by MakeWindow.  So, MakeWindow sets the view size while 
  1415.    SetVirtualSize sets the screen size.
  1416.  
  1417.    Writing to the Screen - Since there are two areas to write on a virtual 
  1418.    window, the view and the screen, WNDW must be told where you intend to 
  1419.    place text.  Right after this MakeWindow procedure, it is assumed we are 
  1420.    going to continue to write on the CRT.  But the primary place to write is 
  1421.    the virtual screen.  WriteToVirtual selects that screen.  All subsequent 
  1422.    procedures will write to it - all QWIK routines, WNDW routines, and even 
  1423.    TitleWindow and MakeWindow.  It is treated just like any other screen.  The 
  1424.    exception of course is the cursor routines which must be handled by WNDW 
  1425.    routines only.
  1426.  
  1427.    RelMode - If you do write to the virtual screen and use MakeWindow, the 
  1428.    mode is forced into RelMode.  Otherwise, the window would be nested and 
  1429.    WNDW could not support it.
  1430.  
  1431.    Memory - What does the screen actually look like in memory?  It is saved in 
  1432.    the heap in the same way as a CRT video screen.  Technically, the far 
  1433.    pointer QScrPtr points to the location of the screen which is a contiguous 
  1434.    array of Character/Attribute words.  The last two rows past the screen are 
  1435.    reserved for the virtual titles which are seen on the CRT view when 
  1436.    updated.
  1437.  
  1438.    Writing to the View - It is possible to write to the view if desired.  To 
  1439.    get back and write to the top view, use WriteToCRT.  But the next time the 
  1440.    window is updated, it will all be lost.  
  1441.  
  1442.  
  1443.  
  1444.    Chapter 4, Virtual Windows                                          Page 24
  1445.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1446.  
  1447.  
  1448.    Updating - At some time, we would probably like to see the screen and we 
  1449.    can do this with any of five updating procedures.  The main workhorse is 
  1450.    VUpdateWindow which has been demonstrated several times.  This procedure is 
  1451.    so carefree is doesn't even matter when you use it.  It updates the virtual 
  1452.    window of the current name (TWS.WSname) no matter where it is - on top, 
  1453.    covered, overlayed, and even hidden from the CRT!  The routine actually 
  1454.    hunts for it and updates it.  To show how it can do this, let's modify the  
  1455.    last example:
  1456.  
  1457.      EXAMPLE 12:  Updating covered windows automatically
  1458.      ----------------------------------------------------------------------
  1459.      {$M 16384,12000,12000 }
  1460.      uses Crt,Qwik,Wndw,Goof;
  1461.      begin
  1462.        InitWindow (LightGrayBG,true);
  1463.        SetWindowModes (VirtualMode);
  1464.        SetVirtualSize (20,100);                   { 20 rows by 100 columns }
  1465.        MakeWindow (5,20,15,40,LightCyan+BlueBG,White+BlueBG,SingleBrdr,
  1466.                    Window1);
  1467.        SetWindowModes (0);                        { Back to default modes. }
  1468.        MakeWindow (7,30,16,18,White+GreenBG,GreenBG,DoubleBrdr,Window2);
  1469.        delay (2000);               { Make sure we see where the cursor is. }
  1470.        WriteToVirtual (Window1);         { Now write to the virtual screen }
  1471.        Qfill (1,1,CRTrows,CRTcols,SameAttr,'?');   { Fill screen with data }
  1472.        TitleWindow (Top,Left,Yellow+BlueBG,' Virtual Window ');
  1473.        WWrite ( 4, 8,' >');                      { Let's get our bearings. }
  1474.        QwriteEos (TWS.WndwAttr+blink,'+');
  1475.        QwriteEos (SameAttr,'<- Row 4, Column 10 ');
  1476.        VViewRC (4,10);
  1477.        VUpdateWindow;             { Update the complete window on the CRT. }
  1478.        delay (1000);
  1479.        RemoveWindow;
  1480.        delay (2000);               { Make sure we see where the cursor is. }
  1481.        RemoveWindow;
  1482.      end.
  1483.  
  1484.    With the delay inserted, it gives you time to clearly see that the covered 
  1485.    virtual window was updated even though it was covered by another window.  
  1486.    But that's not all.  When the window was removed, you could see that it was 
  1487.    fully updated even under the part that was covered!  That's the power of 
  1488.    virtual windows.
  1489.  
  1490.    Updating Routines - There are four other updating procedures that can be 
  1491.    chosen other than VUpdateWindow:
  1492.  
  1493.      VUpdateView   - Updates just the window contents.
  1494.      VUpdateTitles - Updates just the titles.
  1495.      VUpdateCursor - Updates new cursor position.
  1496.      VUpdateRows   - Updates selected rows on top view, but full view if 
  1497.                      covered.
  1498.  
  1499.    VUpdateWindow actually executes the first three.  But they are also 
  1500.    available as separate routines for more detailed work.  When the view is on 
  1501.    top of the CRT or hidden, the routines are extremely quick.  VUpdateRows is 
  1502.    especially quick for items like data entry to the virtual screen.  If the 
  1503.  
  1504.  
  1505.    Chapter 4, Virtual Windows                                          Page 25
  1506.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1507.  
  1508.  
  1509.    windows are covered, the procedures have to do more work.  Then 
  1510.    VUpdateWindow takes about the same time as either VUpdateTitles and 
  1511.    VUpdateView, so VUpdateWindow might as well be used.  VUpdateCursor is 
  1512.    almost a trivial routine in any case.
  1513.    
  1514.    Viewing - In this example, you may have noticed that the view was shifted a 
  1515.    bit compared to Example 11, and that the cursor was no longer in view.  It 
  1516.    was shifted by the viewing routine VViewRC.  In fact, we could view any 
  1517.    part of the screen.  Three routines can adjust the reference point of view 
  1518.    of the upper left corner:
  1519.  
  1520.      VViewRC     - Changes to a given (Row,Col).
  1521.      VViewRCrel  - Shifts a number of rows and columns, positive or negative.
  1522.      VScrollView - Shifts a number of rows and columns, and updates the just 
  1523.                    the view and accepts mouse stepped input.
  1524.  
  1525.    The first two only change the coordinates in the virtual window record, 
  1526.    while VScrollView updates the view as well.  VViewRCrel is actually a 
  1527.    subroutine of VScrollView.  All routines check for bounds and will keep the 
  1528.    view within screen limits.
  1529.  
  1530.    Resizing - If the virtual window is the top view, two routines can resize 
  1531.    it by shifting the lower right hand border:
  1532.  
  1533.      VResizeWindow - Shifts a number of rows and columns, and updates the 
  1534.                      entire window.  Accepts both row and column parameters 
  1535.                      which permit mouse stepped input.
  1536.      VZoomWindow   - Toggles window between full size and current size.  
  1537.                      Zooming up, the window is centered on the screen and the 
  1538.                      view is at (1,1).  Zooming down, it returns to the same 
  1539.                      size and location, but the view remains at (1,1).
  1540.  
  1541.    Both routines force writing to the CRT upon exit.  They also completely 
  1542.    update the window since the view and cursor may be shifted.  The titles are 
  1543.    also smoothly updated.  The zoom can be toggled back and forth as long as 
  1544.    it hasn't changed size or hasn't zoomed up another window.
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.    Chapter 4, Virtual Windows                                          Page 26
  1567.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1568.  
  1569.  
  1570.    5.  W I N D O W   M A N A G E M E N T
  1571.  
  1572.    Some of the previous examples have already touched on the principles of 
  1573.    window management.  Now this section provides the full scope of management 
  1574.    to access windows for display or writing, including multiple video pages.
  1575.  
  1576.  
  1577.    ACCESS METHODS
  1578.  
  1579.    The are two basic methods for accessing windows: serial access and random 
  1580.    access; WNDW does them both.
  1581.  
  1582.    Serial Access - This is a simple method of stacking windows over each other 
  1583.    and then removing them in reverse order.  Any writing is always done on the 
  1584.    top window displayed on the CRT.  The only two procedures used are 
  1585.    MakeWindow and RemoveWindow.  For simple menu systems, serial access may be 
  1586.    all that is needed.  The advantages are:
  1587.  
  1588.      . Uses less code.
  1589.      . No gaps in heap memory.
  1590.      . Only one place to write.
  1591.  
  1592.    But the disadvantages are many.  Once a window is removed, it is lost from 
  1593.    memory and must be recreated.  This can cause a significant amount of 
  1594.    shuffle to access other windows.  Serial access is a subset of random 
  1595.    access.
  1596.  
  1597.    Random Access - More and more applications require access to any window at 
  1598.    any time without losing the data.  WNDW was designed to handle this 
  1599.    automatically at very high speed.  The advantages to random access are:
  1600.  
  1601.      . Free access to any window.
  1602.      . Windows are created only once.
  1603.      . Virtual windows can be updated even if covered.
  1604.      . Ease of programming.
  1605.  
  1606.    Any window can be randomly accessed, including fixed, virtual and hidden 
  1607.    windows.  It's as simple as that.  Try running the window management demo 
  1608.    WNDWMGR.PAS again and see how you can hide, show, and access any window.
  1609.    The instructions are on the screen.
  1610.  
  1611.  
  1612.    DISPLAY CONTROL
  1613.  
  1614.    Three procedures select the window to be displayed as the top window:
  1615.  
  1616.      AccessWindow - Accesses the window by name whether hidden or covered.
  1617.      HideWindow   - Hides the top window.
  1618.      ShowWindow   - Shows a window given its name.
  1619.  
  1620.    AccessWindow hunts for the named window and, if it is hidden, it will also 
  1621.    be shown.  ShowWindow is actually a subroutine of AccessWindow.  Any window 
  1622.    (except PermMode) can be hidden and shown; they do not have to be created 
  1623.    with HiddenMode which hides it at the start.
  1624.  
  1625.  
  1626.  
  1627.    Chapter 5, Window Management                                        Page 27
  1628.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1629.  
  1630.  
  1631.    EOS - When using Hide/ShowWindow, the EOS is reset to (1,1) to prevent 
  1632.    unexpected results.  However, if the window is currently displayed on the 
  1633.    CRT and AccessWindow is used, the EOS is restored to its previous value.
  1634.  
  1635.    RemoveWindow - This procedure could be considered a form of display 
  1636.    control, but remember that when a window is removed, it is gone forever, 
  1637.    including any virtual screen.
  1638.  
  1639.    MoveWindow - This procedure shifts the top window around on the CRT by a 
  1640.    given number of rows and columns allowing mouse stepped control.  A window 
  1641.    can be limited in movement by setting the margins in MarginRec.  The bounds 
  1642.    are conveniently checked, so the window will always stay within limits.  In 
  1643.    the WNDWMGR.PAS demo, you can see the status line on row 25 is never 
  1644.    overlapped by MoveWindow.  Although Window0 is a permanent one, we could 
  1645.    easily write to the status line at anytime by using AccessWindow (Window0).
  1646.  
  1647.    Changing Borders - For human factors, it is often helpful to have a border 
  1648.    be emphasized when it becomes the new top window.  Two high speed 
  1649.    procedures handle this well:
  1650.  
  1651.      ChangeBorder  - Changes the top window to the new given border style.
  1652.      RestoreBorder - Restores the original border created with MakeWindow.
  1653.  
  1654.    Both of these procedures work only on the top window, and they can either 
  1655.    be fixed or virtual.  They replace all border parts including tees and also 
  1656.    leave all titles untouched.
  1657.  
  1658.  
  1659.    WRITE CONTROL
  1660.  
  1661.    Three procedures select where the writing procedures will write:
  1662.  
  1663.      WriteToHidden  - Writes to the named hidden window.
  1664.      WriteToVirtual - Writes to the named virtual screen.
  1665.      WriteToCRT     - Writes to the current top window on the CRT.
  1666.  
  1667.    WriteToHidden - A hidden window is saved with the border intact, but is 
  1668.    stripped of any shadow.  It is easier to use the window-relative writing 
  1669.    routines because of the optional border rather that using QWIK which can 
  1670.    still be used.  Any shadow is reconstructed by ShowWindow.
  1671.  
  1672.    WriteToVirtual - A virtual screen can freely use either WNDW or QWIK 
  1673.    routines since it never has a border.  If you want to write directly to the 
  1674.    virtual screen after it has just been created, sometimes it's easier to use 
  1675.    WriteToVirtual (TWS.WSname) provided HiddenMode was not used as well.
  1676.  
  1677.    WriteToCRT - All routines continue to write to their destination until 
  1678.    changed.  This routine will get you back to writing on the CRT.  Some 
  1679.    procedures are forced back to the CRT after their operation.  Here are 
  1680.    those exceptions:
  1681.  
  1682.      AccessWindow           VResizeWindow         MoveWindow
  1683.      HideWindow             VZoomWindow    
  1684.      ShowWindow             ChangeBorder   
  1685.      RemoveWindow           RestoreBorder  
  1686.  
  1687.  
  1688.    Chapter 5, Window Management                                        Page 28
  1689.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1690.  
  1691.  
  1692.  
  1693.    REMEMBER: Use WriteToCRT to get back to the CRT.  If you forget, the text 
  1694.    will of course be in an unexpected window.
  1695.  
  1696.    MakeWindow - This procedure does NOT force a change in the write 
  1697.    destination.  If you are writing to a hidden window or a virtual screen, 
  1698.    the resulting window created by MakeWindow is forced into RelMode.  
  1699.    However, the WindowModes setting is not affected.
  1700.  
  1701.  
  1702.    WINDOW MODES AND FLAGS
  1703.  
  1704.    Additional window modes are available to restrict window operations or to 
  1705.    detect the window destination status.  Each mode has a corresponding 
  1706.    boolean flag.
  1707.  
  1708.    Restrictive Modes - In some applications, you may want to restrict what the 
  1709.    end user can change for the windows.  Before the window is created with 
  1710.    MakeWindow, use these modes in SetWindowModes.  The flag can be used for 
  1711.    testing.
  1712.  
  1713.      Set Mode      Set Flag      Description
  1714.      ------------  ------------  --------------------------------------------
  1715.      NoHideMode    NoHideFlag    Ignores HideWindow operation.
  1716.      NoAccessMode  NoAccessFlag  Ignores AccessWindow operation.
  1717.      NoMoveMode    NoMoveFlag    Ignores MoveWindow/VResizeWindow operations.
  1718.  
  1719.  
  1720.    Destination Modes - These modes are just for your information and are 
  1721.    handled automatically by WNDW.  These identify the write destination of the 
  1722.    window.  You can use the flags for testing, but the modes are ignored by 
  1723.    SetWindowModes:
  1724.  
  1725.      Set Mode       Set Flag       Description
  1726.      -------------  -------------  ------------------------------
  1727.      ToCRTMode      ToCRTFlag      Writing to the CRT.
  1728.      ToHiddenMode   ToHiddenFlag   Writing to the hidden window.
  1729.      ToVirtualMode  ToVirtualFlag  Writing to the virtual screen.
  1730.  
  1731.  
  1732.    HIGH SPEED SCREEN DESIGN
  1733.  
  1734.    By using Hidden or Virtual windows, WNDW enables you to make screen design 
  1735.    several magnitudes faster than you ever thought possible.  
  1736.  
  1737.    Comparing Speeds - Let's compare three speeds - (1) Turbo's direct video, 
  1738.    (2) QWIK/WNDW writing to CRT, and (3) QWIK/WNDW writing to RAM.  The 
  1739.    following chart is striking.  
  1740.  
  1741.                         ---- QWIK/WNDW ----
  1742.      Video Card  Turbo  To CRT    To RAM
  1743.      ----------  -----  ------  ----------
  1744.      CGA         100%   225%    1600-4100%
  1745.      All others  100%   750%     900-1700%
  1746.  
  1747.  
  1748.  
  1749.    Chapter 5, Window Management                                        Page 29
  1750.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1751.  
  1752.  
  1753.    Design Strategy - So how can you get these fantastic speeds?  The simplest 
  1754.    way was shown in Example 3 by creating hidden windows.  You may wish to 
  1755.    make a habit of creating your windows with HiddenMode and then immediately 
  1756.    show them with ShowWindow.  Virtual window code is not even required for 
  1757.    hidden windows.  Of course, the alternative is to go ahead and use virtual 
  1758.    windows.  Either way, you can actually see the increase in performance in 
  1759.    your programs.
  1760.    
  1761.    Code Savings - Many application programs use disk-based screens that are 
  1762.    called from the disk when required.  QWIK and WNDW require such little code 
  1763.    to create a full screen design, that you will actually save code and disk 
  1764.    space by using these routines - not to mention the increase in speed!
  1765.  
  1766.  
  1767.    MULTIPLE VIDEO PAGES
  1768.  
  1769.    Most color video cards have the capacity for multiple video pages.  If your 
  1770.    application can benefit with extra pages, WNDW handles all the data records 
  1771.    with simplicity.
  1772.  
  1773.    Compiling - To include the multiple video page code in the unit, the 
  1774.    conditional directive MultiPage must be defined.  The distributed unit 
  1775.    already defines it for you.  If you have the source code, the directive 
  1776.    is found at the top of WNDW5X.PAS.  To eliminate the code when these pages 
  1777.    are not needed, simply remove the "$" in front of "Define MultiPage".
  1778.  
  1779.    Changing Pages - To change video pages, use one of the following 
  1780.    procedures:
  1781.  
  1782.      WriteToPage      - Directs all QWIK and WNDW routines to write to the 
  1783.                         given page number, but still view the current page.
  1784.      WriteAndViewPage - Directs all QWIK and WNDW routines to write and to 
  1785.                         view the given page number.
  1786.  
  1787.    Separate Records - Each video page has its own set of window records that 
  1788.    are completely separate including the level indexes and top window stats.  
  1789.    So when pages are swapped, everything is just where it was left - even the 
  1790.    cursor mode and EOS.  However, the virtual screen records use the same 
  1791.    array in the heap, but, to keep them separate, they do not share records.
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.    Chapter 5, Window Management                                        Page 30
  1811.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1812.  
  1813.  
  1814.    6.  D A T A   M A N A G E M E N T 
  1815.  
  1816.    Almost all of the data is handled automatically by WNDW.  This section is 
  1817.    provided for those who are interested in the details of data management and 
  1818.    the inner workings of WNDW.  The only required reading is Data Allocation.  
  1819.    Otherwise, you can skip this section.
  1820.  
  1821.  
  1822.    DATA ALLOCATION
  1823.  
  1824.    This topic will provide you enough knowledge to budget the number of data 
  1825.    records needed for you program using the constants MaxWndw, MaxVirualWndw, 
  1826.    and MaxPageUsed.
  1827.  
  1828.  
  1829.    Data Structure - For a detailed description of the data structure, you can 
  1830.    refer to Data Structure in Section 3 of WNDWREF.DOC.  To be able to adjust 
  1831.    the data structure, you must have the source code.  If not, the sizes have 
  1832.    been preassigned.
  1833.  
  1834.    MaxWndw - Each window on the CRT, displayed or hidden, requires one window 
  1835.    record of statistics called WndwStat which is global data.  The initial 
  1836.    window, Window0, is always at WndwStat[0].  They array of records is sized 
  1837.    by MaxWndw as the highest number of windows, hidden and displayed, that are 
  1838.    on the CRT at any one time on any one video page.   For example, if page 0 
  1839.    has a maximum of 10 windows and page 1 has 6, set MaxWndw equal to 10.
  1840.  
  1841.    MaxVirtualWndw - Each virtual window has two window records - one is in 
  1842.    WndwStat for the view and the other is in VirtualStat for the virtual 
  1843.    screen which is dynamic data.  The first virtual screen is saved in 
  1844.    VirtualStat[0] since it is zero based.  The array of records is sized by 
  1845.    MaxVirtualWndw as the highest total number of active virtual windows.  For 
  1846.    example, if page 0 has 4 virtual windows and page 1 also has 4, set 
  1847.    MaxVirtualWndw equal to 7 (not 8).
  1848.  
  1849.    MaxPageUsed - This is the highest page number that will be used in a 
  1850.    multiple video page program.  If you are only using page 0, which is 
  1851.    usually the case, you should go ahead and undefine the directive MultiPage 
  1852.    and not bother with MaxPageUsed.  Each page saves its own WndwStats and 
  1853.    Indexes in one record called PageStat in an array in dynamic memory.  
  1854.    MaxPageUsed and Qwik.MaxPage are compared and the lesser of the two will 
  1855.    size the PageStat array.
  1856.  
  1857.    Program Development - When you first start developing a program, make it 
  1858.    easy on yourself and inflate these constants to provide enough freedom 
  1859.    without having to recompile.  In your final program, you can trim them down 
  1860.    and retest.
  1861.  
  1862.  
  1863.    RECORD HANDLING
  1864.  
  1865.    If you are wondering where your WndwStat record is being saved, the 
  1866.    following will show you how it is managed.
  1867.  
  1868.  
  1869.  
  1870.  
  1871.    Chapter 6, Data Mangement                                           Page 31
  1872.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1873.  
  1874.  
  1875.    Displayed Stack - Each window as it is displayed on the CRT has its 
  1876.    corresponding window record saved in WndwStat starting from the bottom of 
  1877.    the array and stacked upward.  The base window, Window0, is permanent and 
  1878.    saved in WndwStat[0].  The first window displayed is saved in WndwStat[1], 
  1879.    the second in WndwStat[2], and so on.  The top window is in WndwStat[LI] 
  1880.    where LI is the top Level Index.
  1881.  
  1882.    Hidden Stack - Hidden windows have their record moved from WndwStat[LI] to 
  1883.    the top of WndwStat starting from the top of the array stacked downward.  
  1884.    As you can imagine, the hidden stack is simply inverted to the displayed 
  1885.    stack.  So, when a window is hidden, it is placed starting at 
  1886.    WndwStat[MaxWndw].  The last hidden window saved is at WndwStat[HLI].  HLI 
  1887.    is the Hidden Level Index.  Conversely, when a window is shown, it is 
  1888.    removed from the hidden stack and replaced in WndwStat[LI].
  1889.  
  1890.    Random Access - Anytime a window is randomly accessed, the record is pulled 
  1891.    out from the middle of the stack.  The stack is then dropped to fill the 
  1892.    gap. 
  1893.  
  1894.    VirtualStat - The records for the virtual screens are kept in dynamic 
  1895.    memory in an array called VirtualStat and are not shuffled like the window 
  1896.    records.  If a window is virtual, the index to the virtual screen is 
  1897.    WndwStat[?].VI.
  1898.  
  1899.    TopWndwStat - The current window stats are always maintained in the global 
  1900.    record TopWndwStat (TWS).  Combined with a WITH statement, the code is 
  1901.    optimized just like simple global variables.  When working with the current 
  1902.    window, always use TopWndwStat (TWS) in lieu of WndwStat or VirtualStat.
  1903.  
  1904.    TopVirtualStat - Just like TWS, a copy of the current virtual screen record 
  1905.    from VirtualStat is maintained in the global record TopVirtualStat (TVS).
  1906.  
  1907.    RelMode Records - RelMode windows only have the record temporarily placed 
  1908.    in TWS and are not saved in the stack.  They are overwritten with any 
  1909.    change of windows.
  1910.  
  1911.    PermMode Records - PermMode windows have a copy of its record placed in TWS 
  1912.    (and TVS if virtual), but the stack is not shuffled and there are no gaps.  
  1913.    All PermMode records must be the first ones in the stack.  The highest 
  1914.    index of permanent windows is maintained in PLI the Permanent Level Index.
  1915.  
  1916.    Saving Records - Again, WNDW handles this automatically, TWS and TVS are 
  1917.    saved in their appropriate WndwStat or VirtualStat.  Remember, when writing 
  1918.    to virtual screens, TWS and TVS are reversed.  It may be helpful to think 
  1919.    of TVS then as the Top View Stat on the CRT.
  1920.  
  1921.    Finding Records - Since the records are shuffled, just how do you find the 
  1922.    record you want?  Given the window name, GetLevelIndex returns the index in 
  1923.    WndwStat for the window record.
  1924.  
  1925.    Page Records - When swapping pages, WNDW swaps the entire WndwStat array, 
  1926.    top window records, indexes, margins, cursor mode and window modes for 
  1927.    each page.
  1928.  
  1929.    Heap - Virtual screens and hidden windows are saved in the heap.  To 
  1930.  
  1931.  
  1932.    Chapter 6, Data Mangement                                           Page 32
  1933.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1934.  
  1935.  
  1936.    figure your heap requirement, please refer to Appendix A in WNDWREF.DOC.  
  1937.    For your own program, you can also use the HeapOK procedure to test for 
  1938.    MaxAvail.  If there is insufficient heap space, then HeapOK will terminate 
  1939.    the program through the GOOF unit.
  1940.  
  1941.    Stack - Stack checking has been turned off in the units.  Less than 2k is 
  1942.    used for any procedure.
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.    Chapter 6, Data Mangement                                           Page 33
  1994.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  1995.  
  1996.  
  1997.    7.  U T I L I T Y   U N I T S
  1998.    
  1999.    Two other units are required with the WNDW package - GOOF and WUTIL.  The 
  2000.    GOOF unit handles programming errors while WUTIL has some high speed 
  2001.    screamin' routines to add zing into many of the window operations.  WUTIL 
  2002.    is already compiled into WNDW, but the unit is available for your other 
  2003.    programs as well.
  2004.  
  2005.  
  2006.    GOOF UNIT
  2007.      
  2008.    All programmers make mistakes, right?  So, what happens when you try to 
  2009.    make more windows than there are records available?  Since WNDW is so 
  2010.    powerful and can even write in RAM, there is a good possibility that your 
  2011.    mistake may not even show up on the screen.  How do you know if anything 
  2012.    has gone wrong?  The GOOF unit was made especially for handling errors.
  2013.  
  2014.    Displaying Errors - When an error is found in your program, the ShowGoof 
  2015.    procedure is called and the program is terminated.  The CRT will display an 
  2016.    error message in a flashing window.  There are eight fatal errors that are 
  2017.    listed in APPENDIX B in WNDWREF.DOC to identify problems before they 
  2018.    happen.  Please refer to it for the error messages and their solutions.
  2019.  
  2020.    Flexibility - ShowGoof is accessed indirectly with an indirect call.  This 
  2021.    means that you can freely edit the GOOF unit without needing to recompile 
  2022.    WNDW.  You can even edit it for use in your own applications.  The error 
  2023.    message numbers 1-50 are reserved.  So, for your own applications, it is 
  2024.    suggested that you start with number 51.  If you have thoroughly tested 
  2025.    your program, some of the messages can be eliminated.  
  2026.  
  2027.    Using GOOF - It is very important that GOOF be included in the USES list.  
  2028.    You may find that it compiles without it, but if an error does occur, your 
  2029.    system will surely crash.  Notice that GOOF is the last unit in the USES 
  2030.    list as it uses both QWIK and WNDW.
  2031.  
  2032.  
  2033.    WUTIL UNIT
  2034.  
  2035.    To help make WNDW into a fast unit, some maximum/minimum functions and move 
  2036.    procedures were included in the separate unit WUTIL.  Since WUTIL is an 
  2037.    independent unit, you can also use it by itself in your own programs.
  2038.  
  2039.  
  2040.    Maximum/Minimum - These high speed functions compare two values and return 
  2041.    the result whether maximum or minimum.  They have been trimmed down to 
  2042.    operate on specific data types and only use 112 bytes total.
  2043.  
  2044.      MaxI - returns the maximum of two integers.
  2045.      MaxL - returns the maximum of two long integers.
  2046.      MaxW - returns the maximum of two words.
  2047.      MinI - returns the minimum of two integers.
  2048.      MinL - returns the minimum of two long integers.
  2049.      MinW - returns the minimum of two words.
  2050.  
  2051.  
  2052.  
  2053.  
  2054.    Chapter 7, Utility Units                                            Page 34
  2055.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2056.  
  2057.  
  2058.    Move16/MoveWords - Since WNDW needs the highest speed move procedures, two 
  2059.    routines were developed.
  2060.  
  2061.      Move16    - Drop-in replacement for TP's Move that is twice as fast using 
  2062.                  16-bit transfers.
  2063.      MoveWords - Faster than Move16, but destination cannot overlap Source[0].
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.    Chapter 7, Utility Units                                            Page 35
  2116.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2117.  
  2118.  
  2119.    A P P E N D I X   A :   A P P L I C A T I O N   P R O D U C T S
  2120.  
  2121.  
  2122. |  Eagle Performance Software has developed identical products for both 
  2123. |  Turbo C and Turbo Pascal.  Our pledge is to provide you quality products 
  2124. |  with unparalleled performance and ease of use.  All registered users 
  2125. |  receive the complete source code when a signed license agreement is 
  2126. |  returned.
  2127.  
  2128.  
  2129.    QWIK
  2130.  
  2131.    QWIK - For direct screen video, QWIK is the highest performance screen 
  2132.    writing tools available today for all text modes in any video 
  2133.    configuration.  QWIK provides capabilities far beyond in the unit/library 
  2134.    that comes with your compiler.   Here are some of the features:
  2135.                 
  2136.      - Writes on all IBM compatible computers, displays and adapters 
  2137.        including MDA, CGA, EGA, MCGA, VGA, 8514/A, Hercules and 3270 PC.
  2138.      - Superior video detection routine.
  2139.      - Eliminates snow and flicker.
  2140.      - Writes directly to the screen in absolute rather than relative 
  2141.        coordinates.
  2142.      - Writes in all text modes and column modes.
  2143.      - Writes on all video pages.
  2144.      - Writes on virtual screens in RAM.
  2145.      - Writes text and attribute, text only, or attribute only.
  2146.      - Reads strings, characters and attributes.
  2147.      - Uses End-Of-String (EOS) marker for quick string chaining.
  2148.      - Provides standardized cursor shapes for all adapters.
  2149.      - Enhanced cursor movement.
  2150.      - Compatible with DESQview and similar multitasking environments.
  2151.      - Over 650% faster than standard direct screen writing.
  2152.      - Only 2.7k bytes of code if all 43 utilities are used.
  2153.      - Optimized by the compiler and drops unused code.
  2154.      - Used in all other Eagle products.
  2155.      - Excellent documentation like this document.
  2156.  
  2157.    Here are the product versions:
  2158.  
  2159.  
  2160.       File name    CIS Name    Compiler  Release date
  2161.       -----------  ----------  --------  ------------
  2162.       QWIK42B.ARC  QWIK42.ARC  TP4        10-01-88
  2163.       QWIK5X.ARC   QWIK5X.ARC  TP5        12-20-88
  2164.       QWIKC20.ARC  QWKC20.ARC  TC2        12-03-88
  2165.  
  2166.  
  2167.    WNDW - Here are the current product versions of WNDW:
  2168.  
  2169.       File name    CIS Name    Compiler  Release date
  2170.       -----------  ----------  --------  ------------
  2171.       WNDW42.ARC   WNDW42.ARC  TP4        10-15-88
  2172.       WNDW5X.ARC   WNDW5X.ARC  TP5        10-15-88
  2173.       WNDWC20.ARC  WNDC20.ARC  TC2        02-01-89
  2174.  
  2175.  
  2176.    Appendix A: Application Products                                    Page 36
  2177.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2178.  
  2179.  
  2180.  
  2181.  
  2182.    PULL
  2183.  
  2184.    PULL - For multi-level pull-down menus, PULL is fully featured and fully 
  2185.    configurable.  Includes execute, single, and multiple choice menus, 
  2186.    unlimited nested submenus, data entry windows, help windows, directory 
  2187.    windows, message system, and fully completed interfaces.  Some of the 
  2188.    features are:
  2189.  
  2190.      - Uses QWIK and WNDW.
  2191.      - Work window(s) and complete interface for menus
  2192.      - Pull-down menus with 3 menu modes and 7 line modes
  2193.      - Pull-down file directory
  2194.      - Highlighted command letters
  2195.      - Unlimited levels of submenus
  2196.      - Unlimited data entry windows for 9 types of data
  2197.      - Data entry for the work window(s)
  2198.         Free field entry with either fixed column or flexible column        
  2199.          length.
  2200.         Full editing capability including insert cursor mode
  2201.         Full field selection with cursor keys
  2202.         Automatic NumLock for numerical data entry
  2203.         Right or left justification for data entry output
  2204.         Error messages for invalid data entries
  2205.         Error messages for data entries out of range
  2206.      - Automatic sizes and locations for menus.
  2207.      - Operation by cursor 
  2208.        keys or command keys
  2209.      - Pull/Pop between work window and nested submenu(s)
  2210.      - Programmable control of pull and pop sequences
  2211.      - Context-sensitive help
  2212.      - Message lines for prompts and processing
  2213.      - Full working shell for user development
  2214.      - Excellent documentation like this document.
  2215.  
  2216.    Here are the product versions:
  2217.  
  2218.       File name    CIS Name    Compiler  Release date
  2219.       -----------  ----------  --------  ------------
  2220.       PULL42.ARC   PULL42.ARC  TP4        01-03-89
  2221.       PULL5X.ARC   PULL5X.ARC  TP5        TBA
  2222.       PULLC20.ARC  PULC20.ARC  TC2        TBA
  2223.  
  2224.  
  2225.    ON-LINE SERVICES
  2226.  
  2227.    CompuServe - All updated files and later versions can be found on the 
  2228.    CompuServe Borland Forums (GO BPROGA for TP and GO BPROGB for TC) or the 
  2229.    IBM Programming Forum (GO IBMPRO).
  2230.  
  2231. |  The Eagle BBS - After 01-10-89, you can also get the latest files on our 
  2232. |  24-hour BBS at (214) 539-9878, 300/1200 N81.
  2233.  
  2234.  
  2235.  
  2236.  
  2237.    Appendix A: Application Products                                    Page 37
  2238.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2239.  
  2240.  
  2241.    A P P E N D I X   B :   R E V I S I O N   H I S T O R Y
  2242.  
  2243.    REVISIONS:
  2244.  
  2245.    Version 4.0 (12-12-87):
  2246.      . Incorporated QWIK40.TPU for full IBM compatibility.
  2247.      . Combined all modes into one variable - WindowModes.
  2248.      . Added the following procedures/functions:
  2249.          SetWindowModes
  2250.          RestoreTurboWindow
  2251.          PartitionWindow
  2252.          PartitionCross
  2253.          ClearTitle
  2254.          ClearWindow
  2255.          HideWindow
  2256.          ShowWindow
  2257.          MoveWindow
  2258.          AccessWindow
  2259.          GetLevelIndex
  2260.      . Added 7 background constants.
  2261.      . MakeWindow now requires a WindowName.
  2262.      . TitleWindow requires one more direction parameter.
  2263.      . Current WndwStats are kept in TopWndwStat rather than 
  2264.          WndwStat[LI].
  2265.      . LIcurrent was deleted.
  2266.      . Changed BrdrRec type for easier modifications.
  2267.      . Added 3 more borders - VdoubleBrdr, ThinSolidBrdr2, UserBrdr2.
  2268.      . Changed the following names:
  2269.          MixedBrdr     to HdoubleBrdr
  2270.          ThinSolidBrdr to ThinSolidBrdr1
  2271.          Tattr         to TextAttr     { Assigned by Borland }
  2272.  
  2273.    Version 4.0a (12-12-87):
  2274.      . Set the correct dates for WNDWVARS.TPU and WNDW40.TPU.
  2275.    
  2276.    Version 4.2 (10-22-88):
  2277.      . Major revision over WNDW40; over 50 procedures added or changed.
  2278.      . Added professional documents WNDW42.DOC and WNDWREF.DOC.
  2279.      . Added virtual window power.
  2280.      . Enabled direct writing to hidden windows and virtual screens.
  2281.      . Added multiple video page routines.
  2282.      . Added 28 window relative routines.
  2283.      . Replaced Qbox with MakeWindow RelMode.
  2284.      . Replaced ScrollWindow with WScrollUp, WScrollDown, WInsLine, WDelLine, 
  2285.          and WEosLn.
  2286.      . Changed WSwhereR and WSwhereC to be window relative.
  2287.      . Added window-relative stats in WndwStat.
  2288.      . Changed BrdrRec acronyms.
  2289.      . Changed and added window modes.
  2290.      . Added full line drawing procedures.
  2291.      . Changed WndwVars unit to an include file.
  2292.      . Changed ClearWindow to WClrScr
  2293.      . Changed ClearTitle to WClrTitle
  2294.      . Deleted Attr function.
  2295.  
  2296.  
  2297.  
  2298.    Appendix B: Revision History                                        Page 38
  2299.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2300.  
  2301.  
  2302.    Version 5.X (12-20-88):
  2303.      . Compiled WNDW42 under TP5.  No other changes.
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.    Appendix B: Revision History                                        Page 39
  2360.    WNDW Multi-level Virtual Windows                  User's Guide, Version 5.X
  2361.  
  2362.  
  2363.    A P P E N D I X   C :   C R E D I T S
  2364.  
  2365.  
  2366.    Fundamental Ideas - The initial concepts of serial-access windows were 
  2367.    developed by Michael Burton in his copy of WINDO.INC, ver 2.4.  The 
  2368.    concepts were used by written permission.
  2369.  
  2370.    Special  Effects  - Special effects concepts were graciously  suggested  by 
  2371.    Rick Fothergill.
  2372.  
  2373.    Copyright (c) 1986-1988 by James H. LeMay for Eagle Performance Software.
  2374.    All Rights Reserved.  Protected by the United States Copyright Laws.
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.    Appendix C: Credits                                                 Page 40
  2421.